home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / dopus / ced-with-dopus / ced.dopus < prev   
Encoding:
Text File  |  1994-10-03  |  1010 b   |  40 lines

  1. /*
  2.             $VER: dOPUS_CED_aREXX_cONTROL_sCRIPT 1.0 (26.09.94)
  3.  
  4.                               bY STuN/MYSTiC
  5.  
  6.       uSAGE: Make a button with 'CD source' and 'Run asynchronously'
  7.              enabled which looks like this:
  8.  
  9.              AmigaDOS    RX REXX:CED.dopus {p} {f}
  10.  
  11.              If you want to be able to load in all selected files
  12.              instead of only the first one use {F} instead of {f}.
  13. */
  14.  
  15. options failat 21
  16. parse arg portname ' ' filename
  17. options results
  18. CEDactive=pos('rexx_ced',show('Ports'))  /* inactive if 0 */
  19. problems=0
  20.  
  21. address(portname)
  22. busy on
  23. if CEDactive=0 then do
  24.  toptext "CED cONTROL bY STuN/MYSTiC: CED nOT aCTIVE... lOADING nOW!"
  25.  address command 'CED '||filename
  26.  if rc>0 then problems=1
  27. end
  28. else do
  29.  toptext "CED cONTROL bY STuN/MYSTiC: CED aCTIVE... lOADING fILE!"
  30.  address 'rexx_ced'
  31.  'open new'
  32.  cedtofront
  33.  open filename
  34. end
  35.  
  36. address(portname)
  37. if problems=0 then toptext "CED cONTROL: fINISHED!"
  38.  else toptext "CED cONTROL: sHIT! cOULDN'T lOAD CED!"
  39. busy off
  40.